#include "stackedwidget.h"
#include <QMouseEvent>

StackedWidget::StackedWidget(QWidget *parent) :
    QStackedWidget(parent),
    m_mouseOnTop(false)
{
    setMouseTracking(true);
}

void StackedWidget::mouseMoveEvent(QMouseEvent *e)
{
    if(e->pos().y()==0 && !m_mouseOnTop)
        emit showMenus(true);
    else if(e->pos().y()!=0 && m_mouseOnTop)
        emit showMenus(false);
}
